export const loginSuccess = user => ({
    type: 'LOGIN_SUCCESS',
    payload: user
   });
   
   export const logout = () => ({
    type: 'LOGOUT'
   });
   
   export const setToken = (token) => ({
    type: 'SET_TOKEN',
    payload: token,
  });

  export const setUserRole = (role) => ({
    type: 'SET_USER_ROLE',
    payload: role,
  });

  export const setFullname = (fullname) => ({
    type: 'SET_FULLNAME',
    payload: fullname,
  });

  export const clearTokenAndRole = () => ({
    type: 'CLEAR_TOKEN_AND_ROLE',
  });
  
  export const setDoctorDataState = (doctorData) => ({
    type: 'SET_DOCTOR_DATA',
    payload: doctorData,
  });

  export const clearDoctorData = () => ({
    type: 'CLEAR_DOCTOR_DATA',
  })